package com.myutil.utils;

import java.io.File;
import java.io.IOException;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class ConfigFileUtils {

	public static Integer EMAIL_SEND_EXPIRE_NOTIFY_BEFORE_DAY =5;//提前5天发送证书过期提醒
	
	public static Integer BEFORE_DAY =10;//提前10天更新证书
	
	public static JSONObject readFileToJson(String filePath) {
		String content=readFileToString(filePath) ;
		return JSON.parseObject(content);
	}
	
	public static String readFileToString(String filePath) {
		String content= null;
		try {
			content = org.apache.commons.io.FileUtils.readFileToString(new File(filePath),"UTF-8");
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		
		return content;
	}

}
